<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <main-board>
            <template slot="cpu">英特尔</template>
            <template slot="memory">长存</template>
            <template slot="disk">三星</template>
        </main-board>
        <hr/>
        <main-board>
            <template v-slot:cpu>AMD</template>
            <template v-slot:memory>海力士</template>
            <template v-slot:disk>希捷</template>
        </main-board>
    </div>
    <script src="vue.js"></script>
    <script>
        var vm = new Vue({
            el:'#app',
            components:{
              MainBoard:{/*  */
                template:`
                    <div>
                        <header><slot name="cpu"></slot></header>
                        <main><slot name="memory"></slot></main>
                        <footer><slot name="disk"></slot></footer>
                    </div>`
              }
            }
        });
    </script>
</body>
</html>